package spm.entities;

/**
 * This is a persistent class used by Hibernate. The class represents a one of
 * the operations used in the ACL.
 * 
 * @author Evgeny Ryzhkov
 * 
 * $Id: Operation.java 11 2006-12-04 15:04:58Z evgeny.ryzhkov $
 */
public class Operation {

	/**
	 * The unique ID of the operation.
	 */
	private Long id;

	/**
	 * The key in the resource file for the operation name.
	 */
	private String operationNameKey;

	/**
	 * The weight of the operation. It's used to calculate the weight of the
	 * privelege in the ACL.
	 */
	private int operationWeight;

	/**
	 * Constructor without parameters. It is required by Hibernate.
	 */
	public Operation() {
	}

	/**
	 * @return Returns the id.
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            The id to set.
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return Returns the operationName.
	 */
	public String getOperationNameKey() {
		return operationNameKey;
	}

	/**
	 * @param operationName
	 *            The operationName to set.
	 */
	public void setOperationNameKey(String operationNameKey) {
		this.operationNameKey = operationNameKey;
	}

	/**
	 * @return Returns the operationWeight.
	 */
	public int getOperationWeight() {
		return operationWeight;
	}

	/**
	 * @param operationWeight
	 *            The operationWeight to set.
	 */
	public void setOperationWeight(int operationWeight) {
		this.operationWeight = operationWeight;
	}

}
